package com.example.demo.timer;

import com.example.demo.utils.UUIDUtils;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @desc: <br/>
 * @author: Jingbo Hu<br/>
 * @time：2021年06⽉16⽇<br/>
 * @version：v1.0.0<br>
 */
//@Component
public class SchedulerTask {
    private int count = 1;

    /**
     * @return void
     * @Author Smith
     * @Description 设置每1秒执行一次
     * @Date 14:23 2019/1/24
     * @Param
     **/
    @Scheduled(cron = "*/5 * * * * ?") // 基于cron表达式实现
    private void process() {
        System.out.println("hello world " + (count++));
    }
}
